package bdz.projects.lavender.opsm.ui
{
	import bdz.projects.lavender.opsm.vo.ProductVO;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.text.TextField;
	
	/**
	 * ...
	 * @author ...
	 */
	public class ProductCopy extends MovieClip {
		private var _product:ProductVO;
		private var _productName:TextField;
		private var _productType:TextField;
		private var _productPrice:TextField;
		private var _productDesc:TextField;
		function ProductCopy() {
			addEventListener(Event.ADDED_TO_STAGE, initializeComponent);
		}
		private function initializeComponent(evt:Event):void {
			assignStageReferences();
			assignProductValues();
		}
		private function assignProductValues():void {
			_productName.text = _product.brandName;
			_productType.text = _product.title;
			_productPrice.text = _product.price.toString();
			_productDesc.text = _product.description;
		}
		private function assignStageReferences():void {
			_productName = this["pname"];
			_productType = this["ptype"];
			_productPrice = this["pprice"];
			_productDesc = this["pdesc"];
		}
		public function set product(pvo:ProductVO):void {
			_product = pvo;
		}
		public function get product():ProductVO {
			return _product;
		}
		
		
	}
	
}